package com.gzzyy.facerecognition

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.gzzyy.facerecognition.bean.PersonInfo


class ResultPageAdapter(activity: FragmentActivity, private val list: MutableList<PersonInfo>) :
    FragmentStateAdapter(activity) {

    override fun getItemCount(): Int {
        return list.size
    }

    override fun createFragment(position: Int): Fragment {
        return ResultFragment(list[position])
    }
}